<!--右下广告(自动消失)-->
<html>
	<head>
		<meta charset="UTF-8">
		<title>右下广告</title>
	</head>
	<body>
		<div id="nums" style="position: fixed;top: 55%;left: 75%;color: red;font-size: 36px;"></div>
		<img id="pic" style="position: fixed;top: 100%; left: 80%;width: 240px;height: 180px;" src="../public/imgs/1.jpg"/>
	</body>
	<script  type="text/javascript">
		var y=100;
		//上移
		function topup(){
			y--;
			if(y<68){
				y=68;
			}
			pic.style.top=y+'%';
		}
		var t= setInterval("topup()",30);
		//下移
		function topdow(){
			y++;
			if(y<100){
				pic.style.top=y+'%';
			}
			if(y==100){
				pic.parentNode.removeChild(pic);
			}
		}
		//倒计时
		var num=6;
		function getto(){
			num--;
			if(num>=0){
				nums.innerHTML='弹框在'+num+':秒后消失';
			}else if(num<0){
				nums.innerHTML='';
				clearInterval(tt);
				var endt= setInterval("topdow()",100);
				clearInterval(t);
			}
		}
		var tt=setInterval("getto()",1000);
	</script>
</html>